﻿namespace Grove.Cards.Usg
{
	using System.Collections.Generic;
	using Grove.Core;
	using Grove.Core.Ai;
	using Grove.Core.Details.Cards.Effects;
	using Grove.Core.Dsl;
	using Grove.Core.Targeting;
	using Grove.Core.Zones;

	public class BeaconOfDestruction : CardsSource
  {
    public override IEnumerable<ICardFactory> GetCards()
    {
      yield return C.Card
        .Named("Beacon of Destruction")
        .ManaCost("{3}{R}{R}")
        .Type("Instant")
        .InSets("Urza's Saga")
        .Text(
          "Beacon of Destruction deals 5 damage to target creature or player. Shuffle Beacon of Destruction into its owner's library.")
        .FlavorText("The Great Furnace's blessing is a spectacular sight, but the best view comes at a high cost.")
        .Timing(Timings.InstantRemovalTarget())
        .AfterResolvePutToZone(Zone.Library)
        .Effect<DealDamageToTargets>(p => p.Amount = 5)
        .Targets(
          selectorAi: TargetSelectorAi.DealDamageSingleSelector(5),
          effectValidator: C.Validator(Validators.CreatureOrPlayer()));
    }
  }
}